home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / stuffit.arc / CHKDOS.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-11-18  |  896 b   |  31 lines

  1. ;CHKDOS.ASM
  2.  
  3. ;6.13.85
  4. ;4.27.85
  5. ;        Check for version 2.x+ before proceeding.
  6.  
  7. ;----------------------------------------------------------
  8. ;        constants and messages
  9.  
  10. dos_err_msg     db      'Incorrect DOS version: need 2.0 or higher',cr,lf
  11.                 db      eos
  12.  
  13. ;----------------------------------------------------------
  14. ;        main code
  15.  
  16. CHKDOS        proc    near
  17.                 mov     ah,30h                  ;get DOS version call
  18.                 int     21h
  19.                 cmp     al,2                    ;AH:minor, AL:major
  20.                 jae     okchkdos
  21.                 mov     dx,offset dos_err_msg
  22.                 mov     ah,9h                   ;DOS print string
  23.                 int     21h
  24.         mov    ax,99            ;special errmsg return code
  25.         stc                ;set CY
  26.         ret
  27. okchkdos:
  28.         clc                ;clear CY for OK return
  29.                 ret
  30. chkdos        endp
  31.